kohonen_prototype Derived Type

type, public :: kohonen_prototype

Class to store a prototype inside a Kohonen map


Inherited by

type~~kohonen_prototype~~InheritedByGraph type~kohonen_prototype kohonen_prototype type~kohonen_pattern kohonen_pattern type~kohonen_pattern->type~kohonen_prototype pattern type~self_organizing_map self_organizing_map type~self_organizing_map->type~kohonen_prototype grid type~two_level_self_organizing_map two_level_self_organizing_map type~two_level_self_organizing_map->type~kohonen_prototype grid, cluster_layer

Type-Bound Procedures

procedure, public :: create => kohonen_prototype_constructor

  • private subroutine kohonen_prototype_constructor(prototype, input_data)

    Class Constructor

    Arguments

    Type IntentOptional Attributes Name
    class(kohonen_prototype) :: prototype

    A kohonen_prototype object

    real(kind=wp), dimension(:,:) :: input_data

    A real array

procedure, public :: destroy => kohonen_prototype_destructor

  • private subroutine kohonen_prototype_destructor(prototype)

    Class Destructor

    Arguments

    Type IntentOptional Attributes Name
    class(kohonen_prototype), intent(inout) :: prototype

    A kohonen_prototype object

procedure, public :: get_prototype => kohonen_prototype_accessor

  • private subroutine kohonen_prototype_accessor(prototype, d)

    Acccessor

    Arguments

    Type IntentOptional Attributes Name
    class(kohonen_prototype) :: prototype

    A kohonen_prototype object

    real(kind=wp), dimension(prototype%number_rows,prototype%number_columns) :: d

    A real variable with the value of the prototype

procedure, public :: set_prototype => kohonen_prototype_mutator

  • private subroutine kohonen_prototype_mutator(prototype, new_data)

    Mutator

    Arguments

    Type IntentOptional Attributes Name
    class(kohonen_prototype) :: prototype

    A kohonen_prototype object

    real(kind=wp), intent(inout), dimension(:,:) :: new_data

procedure, public :: print => kohonen_prototype_print

  • private subroutine kohonen_prototype_print(prototype, unit_)

    Function to print a kohonen prototype

    Arguments

    Type IntentOptional Attributes Name
    class(kohonen_prototype) :: prototype

    A kohonen_prototype object

    integer, intent(inout), optional :: unit_

    An integer variable with the number of the unit

procedure, public :: distance => kohonen_prototype_distance

  • private function kohonen_prototype_distance(prototype, prototype1, f) result(d)

    Function to calculate the distance between two prototypes

    Arguments

    Type IntentOptional Attributes Name
    class(kohonen_prototype) :: prototype

    A kohonen_prototype object

    type(kohonen_prototype) :: prototype1

    A kohonen_prototype object

    class(distance_base), allocatable :: f

    Return Value real(kind=wp)

    A real variable with the distance between prototypes

procedure, public :: get_nrow => kohonen_prototype_nrow

  • private function kohonen_prototype_nrow(prototype) result(nr)

    Function to get the number of rows of the prototype

    Arguments

    Type IntentOptional Attributes Name
    class(kohonen_prototype) :: prototype

    A kohonen_prototype object

    Return Value integer

    Integer variable with the number of rows

procedure, public :: get_ncol => kohonen_prototype_ncol

  • private function kohonen_prototype_ncol(prototype) result(nc)

    Function to get the number of columns of the prototype

    Arguments

    Type IntentOptional Attributes Name
    class(kohonen_prototype) :: prototype

    A kohonen_prototype object

    Return Value integer

    Integer variable with the number of columns

Source Code

type kohonen_prototype
!!   Class to store a prototype inside a Kohonen map
    private
        real(kind=wp),allocatable :: data_(:,:)
        integer :: number_rows,number_columns
    contains
!
        procedure :: create => kohonen_prototype_constructor
        procedure :: destroy => kohonen_prototype_destructor
        procedure :: get_prototype => kohonen_prototype_accessor
        procedure :: set_prototype => kohonen_prototype_mutator
        procedure :: print => kohonen_prototype_print
        procedure :: distance => kohonen_prototype_distance
        procedure :: get_nrow => kohonen_prototype_nrow
        procedure :: get_ncol => kohonen_prototype_ncol
!
end type kohonen_prototype